<?php
/**
 * Created by PhpStorm.
 * User: lili
 * Date: 2018/11/16
 * Time: 16:29
 */

namespace app\index\model;


use think\Model;
use traits\model\SoftDelete;

class User extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $autoWriteTimestamp = true;


    
    
    
    /*
     * 判断是否存在这个用户
     * @param array $where 条件数组
     * @return boolean
     * */
    public function isUser($where=array('uid'=>2)){
       
        $res = $this->where($where)->find();
        if (!empty($res)){
            return $res;
        }else{
            return false;
        }
    }


    
}